package com.lutzyt.delivery.bean;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

/**
 * 地址表
 * @author zyt
 */
@Data
@TableName("address")
public class Address {
  /**
   *
   */
  @TableId(value = "id", type = IdType.AUTO)
  private Integer id;
  /**
   *
   */
  @TableField("province_id")
  private Integer provinceId;

  /**
   * 省
   */
  @TableField(exist = false)
  private String province;
  /**
   *
   */
  @TableField("city_id")
  private Integer cityId;

  /**
   * 市
   */
  @TableField(exist = false)
  private String city;
  /**
   *
   */
  @TableField("county_id")
  private Integer countyId;
  /**
   * 县区
   */
  @TableField(exist = false)
  private String county;
  @TableField(exist = false)
  private String address;
  /**
   * 创建时间
   */
  @TableField("create_time")
  @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
  @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
  private Date createTime;
  /**
   * 逻辑删除
   */
  @TableField("deleted")
  private Integer deleted;
  /**
   * 版本
   */
  @TableField("fversion")
  private Integer fversion;
  /**
   * 备注
   */
  @TableField("remark")
  private String remark;

  private String detail;
  /**
   * 客户id
   */
  @TableField("customer_id")
  private Integer customerId;

  private String name;
  private String phone;
}